package com.example.demo.controller;

import com.example.demo.entity.User;
import com.example.demo.service.UserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/index")
public class IndexController {
    @Resource
    private UserService userService;

    @PostMapping("/insert")
    public void inserUser(@RequestBody User user) {
        userService.insertUser(user);

    }
}
